home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / July 96 / Re Using Counted Ptr objects .1 < prev    next >
Encoding:
Internet Message Format  |  1996-07-16  |  1.1 KB  |  [TEXT/ttxt]

  1. Subject:     Re:Using Counted Ptr objects and Collections?
  2. Sent:        7/15/96 10:17 AM
  3. Received:    7/15/96 10:21 AM
  4. From:        Mark Lanett, mlanett@meer.net
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. >Itrat Khan wrote:
  9. >
  10. >> I'm using an object that I wish to be both reference-counted (pointer
  11. >> based using FW_TCountedPtr) and part of an ordered collection
  12. >> (FW_TOrderedCollection). Here are the problems I run into (pretend my
  13. >> object's type is called CMyClass):
  14.  
  15. [Assuming your reference is called CMyClass and your representation is
  16. called CMyRep...]
  17.  
  18. There is an entirely different approach, which is to use the STL. You can
  19. insert instances (not pointers) of CMyClass into STL collections, and they
  20. will properly manage the representation objects.
  21.  
  22. In general we recommend you use the STL and not use the ODF collections
  23. when possible. When all supported compilers ship with the STL then we will
  24. change ODF to use it, although the old ODF collections will still be
  25. present for backwards compatability.
  26.  
  27.  
  28. --
  29. Mark Lanett, OpenDoc Framework, Apple Computer
  30.  
  31.  
  32.